const webpack = require('webpack')
module.exports = {
    lintOnSave: false,
    publicPath:  "/",
    devServer: {
        proxy: {
            '/v1/': {
                target: 'http://172.31.194.77/v1/',
                // target: 'http://172.31.194.75/v1/',
                changeOrigin: true,
                secure: false,
                pathRewrite: {
                    "^/v1/": '/'
                }
            },
            '/v2/': {
                target: 'http://172.31.194.77/v2/',
                // target: 'http://172.31.194.75/v2/',
                changeOrigin: true,
                secure: false,
                pathRewrite: {  
                    "^/v2/": '/'
                }
            }
        }
    },
    configureWebpack: {
        plugins: [
            new webpack.ProvidePlugin({
                $: "jquery",
                jQuery: "jquery",
                "windows.jQuery": "jquery"
            })
        ]
    },
    css: {
        extract: process.env.NODE_ENV === 'development' ? false : {
            filename: '/css/[name].[contenthash:8].css',
            chunkFilename: '/css/[name].[contenthash:8].css'
        },
    },
}